package cn.xinfei.xdecision.common.model.datax.enums;

import lombok.Getter;

public enum ExecutorEnum implements ICodeEnum {

    HTTP("H", "HTTP 执行器"),
    SQL("S", "SQL 执行器"),
    GROOVY_PRE("G", "GROOVY 前置执行器", ExecutorStage.PRE),
    GROOVY_AFTER("G", "GROOVY 后置执行器", ExecutorStage.AFTER);

    ExecutorEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    ExecutorEnum(String code, String desc, ExecutorStage executorStage) {
        this.code = code;
        this.desc = desc;
        this.stage = executorStage;
    }

    @Getter
    private final String code;
    @Getter
    private String desc;
    @Getter
    private ExecutorStage stage;

    enum ExecutorStage {
        PRE, AFTER
    }
}
